<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="../dist/vue.js"></script>
    <div id="app">
        <p ref="aaa">12321</p>
        <child :title="title" placeholder="啦啦" value="123" type="password"></child>
    </div>
    <script>
        const vm = new Vue({ // 父组件 
            el: '#app',
            data:{
                title:'hello'
            },
            methods:{
                handler(data){
                    console.log(data);
                }
            },
            components:{
                child:{ // propsData.attrs 赋予了实力上
                    template:`<input type="text" v-bind="$attrs"/>`
                }
            }
        });
        setTimeout(() => {
            vm.title = '100'
        }, 1000);
    </script>
</body>

</html>